<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>解构表达式</title>
</head>
<body>
    
    <script>
        let arr = [1,2,3];

        console.log(arr[0])
        console.log(arr[1])
        console.log(arr[2])

        const [a,b,c] = arr;
        console.log(a,b,c);


        const person = {
            name:"zhangsan",
            age:32,
            "sex":"男"
        }
        console.log(person.name,person.age,person.sex);

        const {name,sex,age} = person;
        console.log(name,age,sex);



        let str = "hello world ";

        console.log(str.startsWith("h"))
        console.log(str.endsWith("h"))
        console.log(str.includes("h"))
        console.log(str.includes("hellll"))
        
        
        let ss = `

            <html>
                ddddd

            </jjjjj
                    dddd


        `
        console.log(ss)

        
        let sys = `我是${name}，今年${age+1}岁，${say()}`
        console.log(sys)


        function say(){
            return "函数打印的";
        }
    </script>
</body>
</html>